import java.util.Scanner;
public class Lab03_Task4 {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String n1 = s.nextLine();
        int q1 = s.nextInt();
        double p1 = s.nextDouble();
        s.nextLine();
        String n2 = s.nextLine();
        int q2 = s.nextInt();
        double p2 = s.nextDouble();
        s.nextLine();
        String n3 = s.nextLine();
        int q3 = s.nextInt();
        double p3 = s.nextDouble();
        s.nextLine();
        double t1 = q1*p1, t2 = q2*p2, t3 = q3*p3;
        double stotal = (t1+t2+t3);
        double tax = stotal*(11.75/100);
        double total = stotal+tax;
        System.out.println(String.format("%-20s %-12s %-13s %-10s", "Item", "Quantity", "Price", "Total"));
        System.out.println(String.format("%-27s %-12s %-13s %-10s", n1, q1, String.format("%.2f", p1), String.format("%.2f", t1)));
        System.out.println(String.format("%-27s %-12s %-13s %-10s", n2, q2, String.format("%.2f", p2), String.format("%.2f", t2)));
        System.out.println(String.format("%-27s %-12s %-13s %-10s", n3, q3, String.format("%.2f", p3), String.format("%.2f", t3)));
        System.out.println(String.format("%-21s %-12s %-19s %-10s", "", "", "Subtotal", String.format("%.2f", stotal)));
        System.out.println(String.format("%-21s %-12s %-19s %-10s", "", "", "11.75% sales tax", String.format("%.2f",tax)));
        System.out.println(String.format("%-21s %-12s %-19s %-10s", "", "", "Total", String.format("%.2f", total)));
    }
}